home *** CD-ROM | disk | FTP | other *** search
/ Winzipper / Winzipper_ISO.iso / internet / net commander 1.0 / ISP / SCRPTLST / NJCC.CMD < prev    next >
Encoding:
Text File  |  1996-02-14  |  1.4 KB  |  88 lines

  1. #    New Jersey Computer Connection Trumpet Login.cmd
  2. #
  3. #trace on
  4. #
  5. # set up some strings for dialling up
  6. #
  7. if ![load $number]
  8.   if [query $number "Enter your dial up phone number"]
  9.     save $number
  10.   end
  11. end
  12. if ![load $username]
  13.   if [username "Enter your login username"]
  14.     save $username
  15.   end
  16. end
  17. if ![load $password]
  18.   if [password "Enter your login password"]
  19.     save $password
  20.   end
  21. end
  22. $userprompt = "gin:"
  23. $passprompt = "assword:"
  24. $waitfortag = "to"
  25.  
  26. %attempts = 10
  27. #
  28. #
  29. #----------------------------------------------------------
  30. #
  31. # initialize modem
  32. #
  33. output "atz"\13
  34. if ! [input 10 OK\n]
  35.   display "Modem is not responding"\n
  36.   abort
  37. end
  38. #
  39. # send phone number
  40. #
  41. %n = 0
  42. repeat
  43.   if %n = %attempts
  44.     display "Too many dial attempts"\n
  45.     abort
  46.   end
  47.   output "atdt"$number\13
  48.   %ok = [input 60 CONNECT]
  49.   %n = %n + 1
  50. until %ok
  51. input 10 \n
  52. #
  53. #  wait till it's safe to send because some modem's hang up
  54. #  if you transmit during the connection phase
  55. #
  56. wait 30 dcd
  57. #
  58. #  wait for the username prompt
  59. #
  60. input 30 $userprompt
  61. output $username\13
  62.  
  63. #
  64. # and the password
  65. #
  66. input 30 $passprompt
  67. output $password\13
  68. #
  69. # Wait for the terminal to give the address
  70. #
  71. input 30  $waitfortag
  72. #
  73. # Get the address
  74. #
  75. address 30
  76. #
  77. # Tell the user the ip
  78. #
  79.   display \n
  80.   display Connected.  Your IP address is \i.\n
  81. #
  82. # we are now logged in
  83. #
  84. end
  85. #
  86. # now we are finished.
  87. #
  88.